/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utils;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Hoang
 */
public class SimpleJSonObject {

    private Map<String, String> map;

    public SimpleJSonObject() {
        map = new HashMap<String, String>();
    }

    public void put(String name, String value)
    {
        map.put(name, value);
    }

    @Override
    public String toString() {
        StringBuffer result = new StringBuffer("{");
        for(String key: map.keySet())
        {
            result.append("\"" + key + "\": \"" + map.get(key) + "\",");
        }
        result.deleteCharAt(result.length() - 1);
        result.append("}");
        return result.toString();
    }


}
